package com.pushworld.grc.ui;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JDialog;

import org.jdesktop.jdic.browser.WebBrowser;

import cn.com.infostrategy.ui.common.BillDialog;

public class Dialog_Billoffice extends BillDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	int closeType = -1;
	private String filename="";
	public Dialog_Billoffice(Container _parent, String _filename,WebBrowser wb) {
		super(_parent, _filename);
		this.setSize(1024, 733);
		initialize(wb);
	}

	public Dialog_Billoffice(Container _parent, String _filename, boolean b,boolean c) {
		filename=_filename;
	}
	
	private void initialize(WebBrowser wb) {
		this.setSize(1024, 700);
		
		this.setName(filename);
		this.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); //
		this.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				
				onConfirm();
			}
		});
		this.getContentPane().setLayout(new BorderLayout()); //
		this.getContentPane().add(wb); //
	}

	protected void onConfirm() {
		closeType=1;
		
	}
	public int getCloseType() {
		return closeType; //
	}

}
